{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "6608bd91",
   "metadata": {},
   "source": [
    "------\n",
    "* 2022/9/5 week03\n",
    "* python学习记录\n",
    "* 记录人：doggie"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "75934d95",
   "metadata": {},
   "source": [
    "# 本周学习目标\n",
    "> 1.模块  \n",
    "> 2.变量  \n",
    "> 3.循环遍历"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8e0a3039",
   "metadata": {},
   "source": [
    "# 1.模块"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c9d8dd2c",
   "metadata": {},
   "source": [
    "## 1.1模块（[标准库](https://docs.python.org/zh-cn/3/library/index.html)）\n",
    "> python创始人团队为后面使用这门编程语言的人们提供的解决日常生活可能使用到的功能，而制作的可以方便使用的模块。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "b280320a",
   "metadata": {},
   "outputs": [],
   "source": [
    "import time"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "9eb65b57",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1662345809.6493645"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.time()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "49e651a8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "time.struct_time(tm_year=2022, tm_mon=9, tm_mday=5, tm_hour=10, tm_min=47, tm_sec=15, tm_wday=0, tm_yday=248, tm_isdst=0)"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.localtime()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "3e242a68",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "time.struct_time(tm_year=2022, tm_mon=9, tm_mday=5, tm_hour=2, tm_min=54, tm_sec=10, tm_wday=0, tm_yday=248, tm_isdst=0)"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.gmtime()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "ba84f2e1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'Mon Sep  5 11:11:40 2022'"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "time.asctime(time.localtime())"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "6e94476c",
   "metadata": {},
   "source": [
    "## 1.2模块（开源模块）\n",
    "> 1.因为代码开源  \n",
    "> 2.集合全领域（全人类）的需求  \n",
    "> 3.按照国际标准开放的模块库  \n",
    "> [资源地址](http://pypi.org)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "038c33d5",
   "metadata": {},
   "source": [
    "## 1.3模块（自定义模块）\n",
    "> 1.不愿意开源的有一定知识产权的（开放API租用形式开放）  \n",
    "> 2.自己用的，写的不怎么好，开源出去丢人的"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c4aa8327",
   "metadata": {},
   "source": [
    "# 2.变量\n",
    "> 1.声明变量（命名）规则  \n",
    ">> A.变量名只能是 字母、数字或下划线任意组合\n",
    ">> B.变量名的第一个字符不能是数字  \n",
    ">> C.以下关键字不能声明为变量名（）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "8ad8d41e",
   "metadata": {},
   "outputs": [],
   "source": [
    "网三_01 = \"Xiao Hong\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "c728ddaa",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'Xiao Hong'"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "网三_01"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "f3799a46",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2134453155312"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "id(网三_01)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "7c05a7e4",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "18000001 18000001\n"
     ]
    }
   ],
   "source": [
    "# 案例（关于变量）\n",
    "\n",
    "网三_01_ID =\"18000001\"\n",
    "网三_02_ID = 网三_01_ID\n",
    "print(网三_01_ID,网三_02_ID)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "a525e049",
   "metadata": {},
   "outputs": [],
   "source": [
    "网三_01_ID = \"18000006\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "b0b5d451",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "18000006 18000001\n"
     ]
    }
   ],
   "source": [
    "print(网三_01_ID,网三_02_ID)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9b2f597c",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c637527a",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.12"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
